package com.caojing.syby.ui.details.searchdetails;

import com.caojing.syby.bean.home.HomeGvBean;
import com.caojing.syby.httputils.HttpUtils;

import java.util.HashMap;

/**
 * Created by CaoJing on 2016/10/7.
 */
public class SearchDetailPresenter implements SearchDetailContract.Presenter {
    private SearchDetailContract.Model model;
    private SearchDetailContract.View view;

    public SearchDetailPresenter (SearchDetailContract.View view){
        this.view = view;
        this.model = new SearchDetailModel();
    }
    @Override
    public void initGvData(HashMap<String, String> params) {
        /*加载grodview数据*/
        model.getGvBean(params, new HttpUtils.HttpCallBack<HomeGvBean>() {
            @Override
            public void onSucess(HomeGvBean homeGvBean) {
                view.onSuccessGetGv(homeGvBean);
            }
            @Override
            public void onFail() {
                view.onFailGetGv("gv网络连接错误");
            }
        });
    }
}
